package com.betterjr.modules.temhandler.entity;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.betterjr.common.annotation.MetaData;
import com.betterjr.common.entity.BetterjrEntity;

@Access(AccessType.FIELD)
@Entity
@Table(name = "t_tem_handler_config")
public class TemHandlerConfig implements BetterjrEntity {

    /** 
     * @Fields serialVersionUID :
     */
    private static final long serialVersionUID = 79503316570326238L;

    /**
     * 流水号
     */
    @Id
    @Column(name = "ID", columnDefinition = "INTEGER")
    @MetaData(value = "流水号", comments = "流水号")
    private Long id;

    /**
     * 数据状态       1正常   9 已失效
     */
    @Column(name = "c_busin_status", columnDefinition = "VARCHAR")
    @MetaData(value = "数据状态       1正常   9 已失效", comments = "数据状态       1正常   9 已失效")
    private String businStatus;

    /**
     * 接口全路径
     */
    @Column(name = "c_server_handler", columnDefinition = "VARCHAR")
    @MetaData(value = "接口全路径", comments = "接口全路径")
    private String serverHandler;

    /**
     * 业务表类的全路径
     */
    @Column(name = "c_businTable_Type", columnDefinition = "VARCHAR")
    @MetaData(value = "业务表类的全路径", comments = "业务表类的全路径")
    private String businTableType;

    /**
     * 处理步骤  2（复核直接生效）  3审核直接生效 4 复核到审核之后再生效
     */
    @Column(name = "c_step_handler", columnDefinition = "VARCHAR")
    @MetaData(value = "处理步骤  2（复核直接生效）  3审核直接生效 4 复核到审核之后再生效", comments = "处理步骤  2（复核直接生效）  3审核直接生效 4 复核到审核之后再生效")
    private String stepHandler;

    /**
     * 复核校验字段集合（多个值用,隔开）
     */
    @Column(name = "c_check_properties", columnDefinition = "VARCHAR")
    @MetaData(value = "复核校验字段集合（多个值用,隔开）", comments = "复核校验字段集合（多个值用,隔开）")
    private String checkProperties;

    /**
     * 审核校验字段集合（多个值用,隔开）
     */
    @Column(name = "c_audit_properties", columnDefinition = "VARCHAR")
    @MetaData(value = "审核校验字段集合（多个值用,隔开）", comments = "审核校验字段集合（多个值用,隔开）")
    private String auditProperties;

    /**
     * 申请生效字段（当申请时同步生效的字段）
     */
    @Column(name = "c_applyEffective_properties", columnDefinition = "VARCHAR")
    @MetaData(value = "申请生效字段（当申请时同步生效的字段）", comments = "申请生效字段（当申请时同步生效的字段）")
    private String applyEffectiveProperties;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBusinStatus() {
        return businStatus;
    }

    public void setBusinStatus(String businStatus) {
        this.businStatus = businStatus;
    }

    public String getServerHandler() {
        return serverHandler;
    }

    public void setServerHandler(String serverHandler) {
        this.serverHandler = serverHandler;
    }

    public String getBusinTableType() {
        return businTableType;
    }

    public void setBusinTableType(String businTableType) {
        this.businTableType = businTableType;
    }

    public String getStepHandler() {
        return stepHandler;
    }

    public void setStepHandler(String stepHandler) {
        this.stepHandler = stepHandler;
    }

    public String getCheckProperties() {
        return checkProperties;
    }

    public void setCheckProperties(String checkProperties) {
        this.checkProperties = checkProperties;
    }

    public String getAuditProperties() {
        return auditProperties;
    }

    public void setAuditProperties(String auditProperties) {
        this.auditProperties = auditProperties;
    }

    public String getApplyEffectiveProperties() {
        return applyEffectiveProperties;
    }

    public void setApplyEffectiveProperties(String applyEffectiveProperties) {
        this.applyEffectiveProperties = applyEffectiveProperties;
    }

    @Override
    public String toString() {
        return "TemHandlerConfig [id=" + id + ", businStatus=" + businStatus + ", serverHandler=" + serverHandler
                + ", businTableType=" + businTableType + ", stepHandler=" + stepHandler + ", checkProperties="
                + checkProperties + ", auditProperties=" + auditProperties + ", applyEffectiveProperties="
                + applyEffectiveProperties + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((applyEffectiveProperties == null) ? 0 : applyEffectiveProperties.hashCode());
        result = prime * result + ((auditProperties == null) ? 0 : auditProperties.hashCode());
        result = prime * result + ((businStatus == null) ? 0 : businStatus.hashCode());
        result = prime * result + ((businTableType == null) ? 0 : businTableType.hashCode());
        result = prime * result + ((checkProperties == null) ? 0 : checkProperties.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((serverHandler == null) ? 0 : serverHandler.hashCode());
        result = prime * result + ((stepHandler == null) ? 0 : stepHandler.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof TemHandlerConfig)) {
            return false;
        }
        TemHandlerConfig other = (TemHandlerConfig) obj;
        if (applyEffectiveProperties == null) {
            if (other.applyEffectiveProperties != null) {
                return false;
            }
        } else if (!applyEffectiveProperties.equals(other.applyEffectiveProperties)) {
            return false;
        }
        if (auditProperties == null) {
            if (other.auditProperties != null) {
                return false;
            }
        } else if (!auditProperties.equals(other.auditProperties)) {
            return false;
        }
        if (businStatus == null) {
            if (other.businStatus != null) {
                return false;
            }
        } else if (!businStatus.equals(other.businStatus)) {
            return false;
        }
        if (businTableType == null) {
            if (other.businTableType != null) {
                return false;
            }
        } else if (!businTableType.equals(other.businTableType)) {
            return false;
        }
        if (checkProperties == null) {
            if (other.checkProperties != null) {
                return false;
            }
        } else if (!checkProperties.equals(other.checkProperties)) {
            return false;
        }
        if (id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!id.equals(other.id)) {
            return false;
        }
        if (serverHandler == null) {
            if (other.serverHandler != null) {
                return false;
            }
        } else if (!serverHandler.equals(other.serverHandler)) {
            return false;
        }
        if (stepHandler == null) {
            if (other.stepHandler != null) {
                return false;
            }
        } else if (!stepHandler.equals(other.stepHandler)) {
            return false;
        }
        return true;
    }

}
